/*
* CourseService.java
* Created on  2014-4-19 下午5:01
* 版本       修改时间          作者      修改内容
* V1.0.1    2014-4-19       gaoxinyu    初始版本
*
*/
package com.genghis.ptas.course.service;

import com.genghis.core.page.entity.Page;
import com.genghis.core.page.entity.PageParameter;
import com.genghis.ptas.course.entity.ChapterInfo;
import com.genghis.ptas.course.entity.CourseComment;
import com.genghis.ptas.course.entity.CourseInfo;
import com.genghis.ptas.course.entity.CourseRegister;
import com.genghis.ptas.security.entity.User;
import org.xml.sax.SAXException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.xpath.XPathExpressionException;
import java.io.IOException;
import java.util.List;


public interface CourseService {
    Boolean upload (HttpServletRequest request, CourseInfo courseInfo,String upFile, String upImg) throws ServletException, IOException, ParserConfigurationException, SAXException, XPathExpressionException;

    Page<CourseInfo> findCoursePageList(PageParameter pageParameter, CourseInfo courseInfo);

    List<CourseInfo> findCourseList();

    int addCourse(CourseInfo courseInfo);

    void editCourse(CourseInfo courseInfo);

    List<ChapterInfo> findChapterByCourseId(Integer id);

    CourseInfo findCourseByCourseId(Integer id);

    void deleteCourseInfoById(Integer id);

    void changeAuditState(String ids, int auditState);

    Boolean checkAuditInfoAuditState(String ids, int auditState);

    void addCourseComment(CourseComment courseComment);

    List<CourseComment> findCourseCommentByCourseId(Integer id);

    List<CourseInfo> findCourseListByTypeIdAndName(Integer typeId,String searchName);

    List<CourseInfo> findCourseListByCourseName(String courseName);

    List<CourseInfo> findUploadCourseListByUserId(Integer userId);

    List<CourseInfo> findTopCollectCourse(int userId);

    List<CourseInfo> findTopRegisterCourse(int userId);

    int findRegisterThisMonth(User user);

    String sumStudyTimeThisMonth(User user);
}
